<?php

namespace App\Http\Controllers;

use App\Model\News;
use Illuminate\Http\Request;

class HomeController extends Controller
{
    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $news = News::orderby('id', 'desc')->paginate(6);
        return view('home.index', compact('news'));
    }

    /**
     * 关于我们
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function about()
    {
        return view('home.about');
    }

    /**
     * 联系我们
     */
    public function contact()
    {
        return view('home.contact');
    }
}
